#include <wx/wx.h>
#include <wx/ffile.h>
#include <wx/filesys.h>
#include <wx/fs_arc.h>
#include <wx/fs_mem.h>
#include "inibuilder.h"

class ManagerModule : public wxModule {
    DECLARE_DYNAMIC_CLASS    (ManagerModule);
    
    public:
        ManagerModule() {
            p_logmgr = NULL;
            p_cfgmgr = NULL;
            p_taskmgr = NULL;
			p_accmgr = NULL;
			p_contactmgr = NULL;
            p_yatemgr = NULL;
            p_historymgr = NULL;
        }

        virtual ~ManagerModule() {}
        
        virtual bool OnInit() {
            // wxImage::AddHandler(new wxPNGHandler);
            // wxFileSystem::AddHandler(new wxArchiveFSHandler);
            // wxFileSystem::AddHandler(new wxMemoryFSHandler);
            
            p_cfgmgr = ConfigManager::get();
			p_accmgr = AccountsManager::get();
			p_contactmgr = ContactsManager::get();
            p_yatemgr = YateManager::get();
            p_taskmgr = TaskManager::get();
            p_historymgr = HistoryManager::get();
            p_logmgr = LogManager::get();
            
            return true;
        }
        
        virtual void OnExit() {
        }
        
    private:
        IniBuilder inibuilder;
};

IMPLEMENT_DYNAMIC_CLASS(ManagerModule, wxModule)
